import java.util.concurrent.*;

/**
 * @ClassName A11
 * @Description
 * @Author Jingxiao.Ye
 * @Date 2021/11/28 下午11:56
 * @Version V1.0
 * @Since JDK 11
 */
public class A11 {

    public static void main(String[] args) throws ExecutionException, InterruptedException, TimeoutException {
        FutureTask<Integer> futureTask = new FutureTask<>(new Task());
        futureTask.run();
        Integer res = futureTask.get(1,TimeUnit.SECONDS);
        System.out.println(res);
    }
}
